﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using imaginecup.util;
using imaginecup.information;
using imaginecup.objectManager;
using Microsoft.Xna.Framework;
using Imaginecup.gameState.malaria;
using Imaginecup.gameState.malaria.componentInit;
using Imaginecup.gameState.malaria.component.children;
using Imaginecup.gameState.malaria.component.malaria;
using Imaginecup.observer;
using Imaginecup.gameState.malaria.component.scene;
using Imaginecup.componentSystem.component;

namespace Imaginecup.gameState.malaria.component.fieldScene
{
    //public interface IMiniMapInfo
    //{
    //    List<EntityInfo> GetMalariaMiniPos();
    //    List<EntityInfo> GetChildMiniPos();
    //}


    public class CmpFieldScene : BaseScene, ICmpScene  //, IMiniMapInfo
    {     
        private Vector2 m_ScreenSize;
        //private List<EntityInfo> m_MinPosOfChild = new List<EntityInfo>();
        //private List<EntityInfo> m_MinPosOfMalaria = new List<EntityInfo>();
        //private List<IObserver> m_ObserverList = new List<IObserver>();

        
        public CmpFieldScene(GObjectID a_GID, ObjectManager objMan)
            : base(a_GID, objMan, ComponentTypeID.CID_FIELD_SCENE)
        {          
            m_ScreenSize = MalariaState.GetMalariaState().GetMainScreenSize();
        }

        public override void Release()
        {
            //m_MinPosOfChild.Clear();
            //m_MinPosOfMalaria.Clear();

            //m_MinPosOfChild = null;
            //m_MinPosOfMalaria = null;
            base.Release();
        }

        //public IMiniMapInfo GetMiniMapInfo()
        //{
        //    //현재 별도의 클래스로 떼지 않았음.
        //    return this;
        //}

        //public List<EntityInfo> GetChildMiniPos()
        //{
        //    return m_MinPosOfChild;
        //}

        //public List<EntityInfo> GetMalariaMiniPos()
        //{
        //    return m_MinPosOfMalaria;
        //}

        public override EMessageResult HandleMessage(GMessage a_Msg)
        {
            //if (a_Msg.m_Type.MessageTypeID == MessageTypeID.MT_CHANGE_CHILDRENPOSITION.MessageTypeID)
            //    AddChildInfo(a_Msg);
            //else if (a_Msg.m_Type.MessageTypeID == MessageTypeID.MT_CHANGE_MALARIAPOSITION.MessageTypeID)
            //    AddMalariaInfo(a_Msg);
            //else if (a_Msg.m_Type.MessageTypeID == MessageTypeID.MT_CLEAR_MINIMAPINFO.MessageTypeID)
            //    ClearInfo();

            return base.HandleMessage(a_Msg);
        }

    }
}
